package gui;

import javax.swing.table.TableModel;

import com.audiobuddy.serializables.Song;
import com.audiobuddy.serializables.SongCommand;


import domain.ServerDomainController;

public class GuiController {

	private ServerDomainController dc;
	private ServerMainJFrame frame;

	public GuiController(ServerDomainController serverDomainController) {
		this.dc = serverDomainController;
		this.startGui();
	}

	private void startGui() {
		frame = new ServerMainJFrame(this);
	}

	public TableModel getSongTableModel() {
		return dc.getSongTableModel();
	}

	public void multicastPlaylist() {
		dc.multicastPlaylist();
		
	}

	public void stopSong() {
		dc.stopSong();
		
	}

	public void setCurrentSong(Song currentSong) {
		frame.setCurrentSong(currentSong);
		
	}

	public void sendCommand(SongCommand songCommand) {
		dc.executeSongCommand(songCommand);
		
	}

	public void setVolume(int value) {
		dc.setVolume(value);
		
	}

}
